/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language enrstuing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.enrstu.service;

import me.zhengjie.modules.enrstu.service.dto.AdministrativeDivisionImportDto;
import me.zhengjie.modules.enrstu.service.dto.CommunityDto;
import me.zhengjie.modules.enrstu.service.dto.SchoolDto;
import me.zhengjie.modules.enrstu.domain.Community;
import me.zhengjie.utils.PageResult;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
* @website https://eladmin.vip
* @description 社区信息-服务接口
* @author yyx
* @date 2024-10-23
**/
public interface CommunityService {


    /**
     * 根据ID查询
     * @param communityId ID
     * @return CommunityDto
     */
    CommunityDto findById(String communityId);

    /**
    * 创建
    * @param resources /
    */
    void create(Community resources,List<Community> communitylist);

    /**
    * 编辑
    * @param resources /
    */
    void update(Community resources);

    /**
    * 删除
    * @param id /
    */
    void delete(String id);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<CommunityDto> all, HttpServletResponse response) throws IOException;

    /**
     * 根据学区id统计对应社区数量
     * @param id /
     * @return /
     */
    Long total(String id);

    /**
     * 根据学区id查询社区列表
     * @param schoolDistrictId /
     * @return /
     */
    List<Object> queryAll(String schoolDistrictId);

    /**
     * 判断社区名称是否存在
     * @param name /
     * @return /
     */
    Boolean isCommunityName(String name);
    /**
     * 修改社区名称
     * @param id /
     * @param obj /
     */
    void updateSave(String id, Object obj);

    /**
     * 批量添加社区
     * @param communitylist /
     * @param schoolDistrictId /
     */
    void createSaveBatch(List<AdministrativeDivisionImportDto> communitylist, String schoolDistrictId);



}